Release 10.1A: OpenEdge Development:
Progress Dynamics Managers API Reference


checkIfOverlaps

This procedure checks if any record in a specified table exists that would overlap with a specified date range.

Location: af\app\afgenmngrp.i

Parameters:

INPUT pcTable AS CHARACTER

Name of table to do search on.

INPUT pcKeyField AS CHARACTER

Name of the keyfield to use in search. (Most probably foreign-key.)

INPUT pcFromField AS CHARACTER

Name of the 'from field', that is, from_date \ admission_date.

INPUT pcToField AS CHARACTER

Name of the 'to field', that is, to_date \ discharge_date.

INPUT pdCurrentRecordObj AS DECIMAL

Obj value of current record, just to ensure that you do not compare values to the same record when modifying.

INPUT pdKeyValue AS DECIMAL

Value of the keyfield, generally the obj number.

INPUT ptFromValue AS DATE

Value to compare from.

INPUT ptToValue AS DATE

Value to compare to.

INPUT pcAdditionalWhere AS CHARACTER

Additional WHERE clause that can be added to the query if needed.

Note: It creates a buffer for pcTable. Thus if you passed in gsm_person, the created buffer will be bgsm_person. In pcAdditionalWhere remember to use the prefixed 'b' in your criteria specification

OUTPUT plOverlap AS LOGICAL

Logical value specifying if overlapping was found.

OUTPUT ptOverlapFrom AS DATE

Null(?) if no overlapping, otherwise from date of overlapping record.

OUTPUT ptOverlapTo AS DATE

Null(?) if no overlapping, otherwise to date of overlapping record.

Notes: None

Examples: See the main block in af\app\afgenchkifovrlpp.p.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095